<?php

class User extends Model
{
    protected $table = 'users';

    public function find($id)
    {
        // 这里应该查询数据库
        // 示例：返回模拟数据
        return [
            'id' => $id,
            'name' => '张三',
            'email' => 'zhangsan@example.com'
        ];
    }

    public function all()
    {
        // 返回所有用户
        return [
            ['id' => 1, 'name' => '张三'],
            ['id' => 2, 'name' => '李四']
        ];
    }
}
